package cn.donghuapian.handler;

import org.camunda.bpm.engine.delegate.DelegateTask;
import org.camunda.bpm.engine.delegate.TaskListener;

import java.util.ArrayList;

/**
 * @description:
 * @author: hzw
 * @time: 2024/9/6 16:40
 */
public class WorkflowTaskListener implements TaskListener {

    @Override
    public void notify(DelegateTask delegateTask) {
        String taskId = delegateTask.getId();
        //流程定义中设置的节点key
        String taskKey = delegateTask.getTaskDefinitionKey();
        delegateTask.setAssignee("审批人");
        //设置审批候选人
//        delegateTask.addCandidateUsers(new ArrayList<>());
    }
}
